<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<title>Coach Info</title>
<!--导航栏下-->
<!-- bootstrap的css核心，定义了很多class -->
<link rel="stylesheet" type="text/css" href="/css/bootstrap.css" />
<script type="text/javascript" src="/js/jquery.min.js"></script>
<!--生成弹框、提示框、下拉菜单  -->
<script type="text/javascript" src="/bootstrap/popper.min.js"></script>
<!--bootstrap的js、用于响应事件  -->
<script type="text/javascript" src="/bootstrap/bootstrap.min.js"></script>


<!--导航栏上-->
<!-- for-mobile-apps -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords"
	content="Personal Profile Form Widget Responsive, Login form web template, Sign up Web Templates, Flat Web Templates, Login signup Responsive web template, Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<!-- //for-mobile-apps -->
<link href='//fonts.googleapis.com/css?family=Questrial'
	rel='stylesheet' type='text/css'>
<link
	href='//fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic'
	rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/css/j-forms.css">
<link href="/css/style1.css" rel="stylesheet" type="text/css"
	media="all" />
<script type="text/javascript"
	src="http://api.map.baidu.com/api?v=3.0&ak=NEVPuaso46TGp6IAWEyvVnP75mdbGtX4"></script>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script src="/js/vue.js"></script>
<!--引入axios -->
<script src="/js/axios.js"></script>

</head>
<body>
	<!-- //header -->
	<!--Slider-->
	<div id="navigationBar" class="slider">
		<div class="header-bottom">
			<div class="container">
				<nav class="navbar navbar-default">
					<!-- Brand and toggle get grouped for better mobile display -->
					<div class="navbar-header">
						<button type="button" class="navbar-toggle collapsed"
							data-toggle="collapse"
							data-target="#bs-example-navbar-collapse-1">
							<span class="sr-only">Toggle navigation</span> <span
								class="icon-bar"></span> <span class="icon-bar"></span> <span
								class="icon-bar"></span>
						</button>
						<div class="logo">
							<h1>
								<a class="navbar-brand" href="/index.html">yoga</a>
							</h1>
						</div>
					</div>
					<!-- Collect the nav links, forms, and other content for toggling -->
					<div class="collapse navbar-collapse nav-wil"
						id="bs-example-navbar-collapse-1"
						style="background-color: rgba(255, 251, 255, 0.3)">
						<nav class="cl-effect-1" id="cl-effect-1">
							<ul class="nav navbar-nav">
								<!--<li><a href="#home" class="active" data-hover="Home">首页</a></li>
								<li><a href="#about" class="scroll" data-hover="About">关于</a></li>-->
								<!--<li><a href="#services" class="scroll" data-hover="Services">私教课程</a></li>-->
								<li><a href="#student" class="scroll" data-hover="student">学员风采</a></li>
								<li v-if="roles != 0"><a href="/ClubMap.html"
									class="scroll" data-hover="Team">场馆地图</a></li>
								<li v-if="roles != 0"><a href="/CoachMap.html"
									class="scroll" data-hover="Team">教练地图</a></li>
								<li v-if="roles == 1||roles == 2"><a href="/student/showMe"
									class="scroll" data-hover="Team">学员信息完善</a></li>
								<li v-if="roles == 1||roles == 3"><a href="/coach/showMe"
									class="scroll" data-hover="Team">教练信息完善</a></li>
								<li v-if="roles == 1||roles == 4"><a
									href="/yogaclub/showMe" class="scroll" data-hover="Team">场馆信息完善</a></li>
								<li><a href="#gallery" class="scroll" data-hover="Projects">会馆图片</a></li>
								<li v-if="roles == -1"><a href="/login.html" class="scroll"
									data-hover="login">登陆</a></li>
								<li v-if="roles == -1"><a href="/register.html"
									class="scroll" data-hover="register">注册</a></li>
								<li v-if="roles == 5"><a href="/adminindex.html"
									class="scroll" data-hover="register">管理</a></li>
								<li
									v-if="roles == 1||roles == 2||roles == 3||roles == 4||roles ==5"><a
									href="/logout">注销</a></li>
								<li>
									<button class="btn btn-default " type="button"
										id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true"
										aria-expanded="true"
										style="opacity: 0.5; background-color: #4CAF50;"
										v-if="roles == 4">
										我 <span class="caret"></span>
									</button>
									<ul class="dropdown-menu" style="opacity: 0.5"
										v-if="roles == 4">
										<li><a href="#">我的主页</a></li>
										<li><a href="/html/chat.html">信息中心</a></li>
									</ul>
									<button class="btn btn-default dropdown-toggle" type="button"
										id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true"
										aria-expanded="true" style="opacity: 0.5;" v-if="roles == 3">
										我 <span class="caret"></span>
									</button>
									<ul class="dropdown-menu" aria-labelledby="dropdownMenu2"
										style="opacity: 0.5" v-if="roles == 3">
										<li><a href="/orderShowCoach.html">我的订单</a></li>
										<li><a href="/coachmes.html">我的详情</a></li>
										<li><a href="/pocket.html">我的钱包</a></li>
										<li><a href="/html/chat.html">信息中心</a></li>
									</ul>
									<button class="btn btn-default dropdown-toggle" type="button"
										id="dropdownMenu3" data-toggle="dropdown" aria-haspopup="true"
										aria-expanded="true" style="opacity: 0.5;" v-if="roles == 2">
										我 <span class="caret"></span>
									</button>

									<ul class="dropdown-menu" aria-labelledby="dropdownMenu3"
										style="opacity: 0.5" v-if="roles == 2">
										<li><a href="/orderShowStudent.html">我的订单</a></li>
										<li><a href="/pocket.html">我的钱包</a></li>
										<li><a href="/html/chat.html">信息中心</a></li>
									</ul>

								</li>

							</ul>
						</nav>
					</div>
				</nav>
			</div>
		</div>
	</div>

	<div class="content">
		<h1>教练信息，资格认证</h1>
		<div class="main w3l">
			<div class="im-g">
				<img th:src="${coach.cimage}" width="120px" height="120px">
			</div>
			<form class="contact-forms wthree" action="/coach/info"
				enctype="multipart/form-data" method="post">
				<input type="hidden" th:value="${coach.cimage}" name="cimage">
				<input type="file" name="headImage" />
				<!-- end /.header-->
				<!-- start name -->
				<div class="first-line agileits">
					<div class="span6 main-row">
						<div class="input">
							<input type="text" th:value="${coach.cnickname}" id="cnickname"
								name="cnickname" placeholder="昵称">
						</div>
					</div>
					<div class="span6 main-row">
						<div class="input">
							<input type="text" th:value="${coach.cname}" id="cname"
								name="cname" placeholder="姓名">
						</div>
					</div>
				</div>
				<!-- end name -->
				<!-- start email phone -->
				<div class="first-line agileits">
					<div class="span6 main-row">
						<div class="input">
							<input type="text" th:value="${coach.cage}" placeholder="年龄"
								id="cage" name="cage">
						</div>
					</div>
					<div class="span6 main-row">
						<div class="input">
							<input type="text" th:value="${coach.ctel}" placeholder="电话"
								id="ctel" name="ctel">
						</div>
					</div>
				</div>
				<div class="first-line agileits">
					<div class="span6 main-row">
						<div class="input">
							<input type="email" th:value="${coach.cmail}" placeholder="邮箱"
								id="cmail" name="cmail">
						</div>
					</div>
					<div class="span6 main-row">
						<div class="input">
							<input type="text" th:value="${coach.cqq}" placeholder="QQ"
								id="cqq" name="cqq">
						</div>
					</div>
				</div>
				<div class="main-row">
					<div class="input">
						<input type="text" th:value="${coach.money}" id="money"
							placeholder="课程价格" name="money" required="">
					</div>
				</div>

				<div class="main-row">
					<label class="input select"> <select name="csex">
							<option value="" selected>性别</option>
							<option value="男">男</option>
							<option value="女">女</option>
					</select> <i></i>
					</label>
				</div>
				<!-- start country -->
				<div class="main-row">
					<label class="input select"> <select name="cgenre">
							<option value="" selected="" disabled="">瑜伽流派</option>
							<option value="普拉提">普拉提</option>
							<option value="阴瑜伽">阴瑜伽</option>
							<option value="轮瑜伽">轮瑜伽</option>
							<option value="球瑜伽">球瑜伽</option>
							<option value="空中瑜伽">空中瑜伽</option>
							<option value="孕产瑜伽">孕产瑜伽</option>
							<option value="寰宇瑜伽">寰宇瑜伽</option>
							<option value="颂钵疗愈">颂钵疗愈</option>
							<option value="阿斯汤伽">阿斯汤伽</option>
							<option value="精准正位">精准正位</option>
							<option value="维密塑性">维密塑性</option>
							<option value="舞韵瑜伽">舞韵瑜伽</option>
							<option value="全功能运动康复">全功能运动康复</option>
					</select> <i></i>
					</label>
				</div>
				<!-- end country -->
				<!-- start position -->
				<div class="main-row">
					<label class="input select"> <select name="freetime">
							<option value="" selected disabled="">空闲时间</option>
							<option value="早:(8:00-12:00)">早:(8:00-12:00)</option>
							<option value="中:(12:00-17:00)">中:(12:00-17:00)</option>
							<option value="晚:(17:00-21:00)">晚:(17:00-21:00)</option>
					</select> <i></i>
					</label>
				</div>
				<div class="main-row">
					<label class="input select"> <select name="state">
							<option value="" selected disabled="">是否接课</option>
							<option value="是">是</option>
							<option value="否">否</option>

					</select> <i></i>
					</label>
				</div>
				<div class="main-row">
					<label class="input select"> <select name="cpower">
							<option value="" selected disabled="">信息权限</option>
							<option value="1">全部公开</option>
							<option value="2">好友可见</option>
							<option value="3">仅自己可见</option>
					</select> <i></i>
					</label>
				</div>
				<div class="footer">
					<button type="submit" class="primary-btn">提交</button>
					<button type="reset" class="secondary-btn">重置</button>
				</div>
				<!-- end /.footer -->
			</form>
			<form class="contact-forms wthree" action="/coach/approve">

				<!-- start message -->
				<div class="main-row">
					<div class="input">
						<!-- 	<textarea placeholder="自我介绍" name="message"></textarea> -->
						<div id="container" style="width: 99%; height: 300px;"></div>
					</div>
				</div>
				<div class="main-row">
					<div class="input">
						<input type="text" id="addr" placeholder="地址" name="caddrmes"
							th:value="${coach.caddrmes}"> <input type="hidden"
							id="jinwei" placeholder="经纬度" name="caddress"
							th:value="${coach.caddress}">
					</div>
				</div>
				<div class="main-row">
					<div class="input">
						<input type="text" th:value="${coach.cidcard}" placeholder="身份证"
							id="cidcard" name="cidcard">
					</div>
				</div>

				<div class="main-row">
					<div class="input">
						<textarea placeholder="自我介绍" spellcheck="false" name="describe"
							th:value="${coach.describe}"></textarea>
						<span class="tooltip tooltip-right-top">Key Skills</span>
					</div>
				</div>
				<div class="footer">
					<button type="submit" class="primary-btn">发起认证请求</button>
				</div>
			</form>
		</div>
	</div>
	<script>
		$(document).ready(
				function() {
					var map = new BMap.Map("container");
					var point = new BMap.Point(104.0699519292, 30.5790607666);
					map.centerAndZoom(point, 15);
					map.enableScrollWheelZoom(true);
					map.addControl(new BMap.NavigationControl()); //向地图中添加缩放控件
					var ctrlSca = new window.BMap.ScaleControl({
						anchor : BMAP_ANCHOR_BOTTOM_LEFT
					});
					map.addControl(ctrlSca); //比例尺  
					map.addControl(new BMap.MapTypeControl({
						mapTypes : [ BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP,
								BMAP_HYBRID_MAP ]
					}));

					map.addEventListener("click", function(e) {
						var jinwei = e.point.lng + ", " + e.point.lat;
						$("#jinwei").val(jinwei);
					});
					var geoc = new BMap.Geocoder();
					map.addEventListener("click", function(e) {
						var pt = e.point;
						geoc.getLocation(pt, function(rs) {
							var addComp = rs.addressComponents;
							var context = addComp.province + addComp.city
									+ addComp.district + addComp.street
									+ addComp.streetNumber;
							$("#addr").val(context);
						});
					});

				});
		new Vue({
			el : "#navigationBar",
			data : {
				roles : ""
			},
			beforeCreate : function() {
				var temp = this;

				axios.get("/user/getRoles").then(function(value) {
					temp.roles = value.data
				});

			}
		})
	</script>
</body>
</html>
